#ifndef QMC5883P_STM32_H
#define QMC5883P_STM32_H

#ifdef __cplusplus
extern "C"
{
#endif
    /*---------------------------- C Scope ---------------------------*/
#include "stdint.h"
#include "fsl_lpi2c.h"

#ifdef __cplusplus
}

#include "device/qmc5883p/qmc5883.h"

class QMC5883P_RT1064 : public QMC5883P
{
private:

   LPI2C_Type* base = nullptr;
	 //uint8_t address;  //7BIT
	 

public:
    QMC5883P_RT1064(LPI2C_Type* _base,Mode_t _mode):base(_base),QMC5883P(_mode){};

    virtual unsigned char i2c_write(unsigned char slave_addr,
                                    unsigned char reg_addr,
                                    unsigned short len,
                                    unsigned char *data_ptr) override;
    virtual unsigned char i2c_read(unsigned char Address,
                                   unsigned char RegisterAddr,
                                   unsigned int RegisterLen,
                                   unsigned char *RegisterValue) override;
    virtual void delay_ms(uint32_t _ms) override;
};

/*---------------------------- C++ Scope ---------------------------*/

#endif

#endif
